package Homework4

import akka.actor.Actor

class BActor extends Actor{
  override def receive: Receive = {
    case "我打" => Thread.sleep(1000)
      println("BActor(乔峰):挺猛，看我降龙十八掌...第1掌")
      sender() ! "BActor(乔峰):挺猛，看我降龙十八掌...第1掌"
    case "AActor(黄飞鸿):厉害！佛山无影脚 第1脚" => Thread.sleep(1000)
      println("BActor(乔峰):挺猛，看我降龙十八掌...第2掌")
      sender() ! ("BActor(乔峰):挺猛，看我降龙十八掌...第2掌")
      context.stop(self)
  }
}
